//
//  MoreEqCell.m
//  TY_CarMachine
//
//  Created by dfwx on 2021/3/6.
//  Copyright © 2021 zhongDaoDianZi. All rights reserved.
//

#import "MoreEqCell.h"

@implementation MoreEqCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.slder.minimumValue = 0;
    self.slder.maximumValue = 14;
    self.slder.continuous = NO;
    self.slder.value = 7;
    NSInteger value = self.slder.value;
    self.valueLabel.text = [NSString stringWithFormat:@"%ld",value-7];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
- (IBAction)sliderValueChangeAction:(UISlider *)sender {
    
    NSInteger value = sender.value+0.5;
    sender.value = value;
    self.valueLabel.text = [NSString stringWithFormat:@"%ld",value-7];
    if (self.delegate && [self.delegate respondsToSelector:@selector(MoreEqCellValueChangeWithTag:withValue:)]) {
        [self.delegate MoreEqCellValueChangeWithTag:self.tag withValue:value];
    }
    
}

@end
